﻿
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[usp_DeleteRecord] 
	@KeyName varchar(50),
	@TableName varchar(50),
	@Key varchar(50)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
DECLARE @SQL AS varchar(200)
SET @SQL = N'DELETE FROM ' + @TableName + ' WHERE ' + @KeyName + '=' +@Key
	
EXEC sp_sqlexec @SQL
END